﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using System.Data;

namespace WebsiteAdmin.Wilson.ProInfo
{
    public partial class ProOtherCreate : System.Web.UI.Page
    {
        public int proId = 0;
        public string proName = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                proId = Convert.ToInt16(Request["proId"], CultureInfo.InvariantCulture);
                Single(Global.ConnWilson, proId);
            }
        }

        protected void Single(string strCon, int proId)
        {
            using (DataTable dt = Bll.Product.Single(strCon, proId)) 
            {
                if (dt != null && dt.Rows.Count > 0) 
                {
                    proName = dt.Rows[0]["ProName"].ToString();
                }
            }
        }
    }
}
